projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a93fbf4
)
arm/lib/bootm.c: keep ARM v7M in thumb mode during boot_jump_linux()
author
Patrice Chotard
<
[email protected]
>
Tue, 25 Apr 2017 09:07:46 +0000
(11:07 +0200)
committer
Tom Rini
<
[email protected]
>
Thu, 27 Apr 2017 20:49:08 +0000
(16:49 -0400)
On ARM v7M, the processor will return to ARM mode when executing
a blx instruction with bit 0 of the address == 0. Always set it
to 1 to stay in thumb mode.
Tested on STM32f746-disco board
Similar commit:
f99993c10882f7dc8ec35993d5febe59aac01e6a
Author: Matt Porter <
[email protected]
>
Signed-off-by: Patrice Chotard <
[email protected]
>
arch/arm/lib/bootm.c
patch
|
blob
|
history
diff --git
a/arch/arm/lib/bootm.c
b/arch/arm/lib/bootm.c
index 426bee6da577bc3f55b2df583607bc60da9d758e..4dbe6a53033110c5ac8d4c53b629e96c6f5f8749 100644
(file)
--- a/
arch/arm/lib/bootm.c
+++ b/
arch/arm/lib/bootm.c
@@
-356,7
+356,10
@@
static void boot_jump_linux(bootm_headers_t *images, int flag)
int fake = (flag & BOOTM_STATE_OS_FAKE_GO);
kernel_entry = (void (*)(int, int, uint))images->ep;
-
+#ifdef CONFIG_CPU_V7M
+ ulong addr = (ulong)kernel_entry | 1;
+ kernel_entry = (void *)addr;
+#endif
s = getenv("machid");
if (s) {
if (strict_strtoul(s, 16, &machid) < 0) {